package en.edu.zucc.pb.loginapplication;

import android.content.Intent;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.facebook.stetho.Stetho;

import en.edu.zucc.pb.loginapplication.activity.BookkeepingActivity;

public class MainActivity extends AppCompatActivity implements
        View.OnClickListener {

    Button btnToHome;
    LinearLayout main_content;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.e("tag", "finished");
        btnToHome = findViewById(R.id.btn_to_home);
//        btnToHome.
//        https://blog.csdn.net/weixin_33810006/article/details/93024770
        btnToHome.setOnClickListener(new Button.OnClickListener() {
            public void onClick(View v) { //使用匿名的Button实例

                //抽象接口的内部方法的实现
                Intent intent = new Intent(MainActivity.this, HomeActivity.class);
                startActivity(intent);
            }
        });
//        btnToHome
//        btn_to_bookkeeping

        findViewById(R.id.btn_to_bookkeeping).setOnClickListener(this);
        Stetho.initializeWithDefaults(this);
//        https://blog.csdn.net/code_hero666/article/details/80282394


//        main_content = findViewById(R.id.main_content);
//        main_content.getChildAt()
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            // 点击小睡
            case R.id.btn_to_bookkeeping:
                Intent intent = new Intent(this, BookkeepingActivity.class);
                startActivity(intent);
                break;
        }
    }
}
